<!DOCTYPE html>
<!--
  Copyright 2010 Google Inc.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

  Original slides: Marcin Wichary (mwichary@google.com)
  Modifications: Ernest Delgado (ernestd@google.com)
                 Alex Russell (slightlyoff@chromium.org)

  landslide modifications: Adam Zapletal (adamzap@gmail.com)
                           Nicolas Perriault (nperriault@gmail.com)
-->
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <title>Project2 股票舆情分析</title>
    <!-- Styles -->
    
    <style type="text/css" media="print">
      * {
    margin: 0;
    padding: 0;
}

@page {
    size: landscape;
}

body {
    font: 100% "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
    padding: 0;
    margin: 0;
}

div.slide {
    min-width: 800px;
    min-height: 600px;
    padding: 1em;
    overflow: hidden;
    page-break-after: always;
    border: 1px solid black;
    border-radius: 20px;
}

div.slide div.inner {
    width: 800px;
    height: 600px;
    margin: auto;
}

h1 {
    font-size: 2.4em;
}

h2 {
    font-size: 1.4em;
}

h3 {
    margin: 1em 0;
}

ul {
    margin: 0;
    padding: 0;
}

p, li, pre {
    margin: 1em 0;
}

li {
    margin-left: 2em;
}

a {
    color: #000000;
}

pre, code {
    max-width: 800px;
    background: #eee;
    font-family: Monaco, monospace;
    font-size: 90%;
}

pre {
    padding: .2em .5em;
    overflow: hidden;
    border-radius: .8em;
}

code {
    padding: 0 .2em;
}

.slide header:only-child h1 {
  line-height: 180%;
  text-align: center;
  display: table-cell;
  vertical-align: middle;
  height: 600px;
  width: 800px;
  font-size: 48px;
  margin-top:100px;
  margin-bottom:100px;
}

#toc, #help, .slide aside, .slide footer, .slide .notes,
.presenter_notes, #current_presenter_notes, #presenter_note {
  display: none;
}

    </style>
    <style type="text/css" media="screen, projection">
      body {
  font: 14px "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
  background: #778;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

div.presentation {
  position: absolute;
  width: 100%;
  display: table-cell;
  vertical-align: middle;
  height: 100%;
  background: inherit;
}

div.presentation > h1 {
  display: none;
}

div.slides, body.expose div.slides.nocontext {
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  position: absolute;
  display: block;
}

div.slides.nocontext {
  width: 900px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  left: auto;
  top: auto;
}

div.slide {
  display: inline;
  position: absolute;
  overflow: hidden;
  width: 900px;
  height: 700px;
  margin-top: -350px;
  margin-left: -400px;
  left: 50%;
  top: 50%;
  background: -webkit-gradient(linear, left bottom, left top, from(#bbd), to(#fff));
  background-color: #eee;
  background: -moz-linear-gradient(bottom, #bbd, #fff);
  -webkit-transition: margin 0.25s ease-in-out;
  -moz-transition: margin 0.25s ease-in-out;
  -o-transition: margin 0.25s ease-in-out;
  border-top-left-radius: 20px;
  -moz-border-radius-topleft: 20px;
  -webkit-border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  -moz-border-radius-topright: 20px;
  -webkit-border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
  -moz-border-radius-bottomright: 20px;
  -webkit-border-bottom-right-radius: 20px;
  border-bottom-left-radius: 20px;
  -moz-border-radius-bottomleft: 20px;
  -webkit-border-bottom-left-radius: 20px;
}

/* Expose */

body.expose div.slides {
  float: left;
  position: relative;
  overflow: auto;
  margin-bottom: 10px;
}

body.expose div.slide {
  display: block;
  float: left;
  position: relative;
  left: auto !important;
  top: auto !important;
  margin: 10px !important;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  -moz-transform: scale(.33, .33);
  -moz-transform-origin: 0 0;
  -webkit-transform: scale(.33, .33);
  -webkit-transform-origin: 0 0;
  -o-transform: scale(.33, .33);
  -o-transform-origin: 0 0;
  -webkit-transition: none;
  -moz-transition: none;
  -o-transition: none;
  cursor: pointer;
}

body.expose div.slide:hover {
  background: -webkit-gradient(linear, left bottom, left top, from(#bdd), to(#fff));
  background-color: #eee;
  background: -moz-linear-gradient(bottom, #bdd, #fff);
}

body.expose .slide-wrapper {
  float: left;
  position: relative;
  margin: .5%;
  width: 300px;
  height: 233px;
}

body.expose .slide footer {
}

body.expose .slide .inner {
}

body.expose .slide.far-past,
body.expose .slide.past,
body.expose .slide.future,
body.expose .slide.far-future {
  margin-left: 0;
}

body.expose .slide.current {
  background: -webkit-gradient(linear, left bottom, left top, from(#ddb), to(#fff));
  background-color: #eee;
  background: -moz-linear-gradient(bottom, #ddb, #fff);
  border: 16px solid #fff;
  -moz-transform: scale(.315, .315);
  -moz-transform-origin: 0 0;
  -webkit-transform: scale(.315, .315);
  -webkit-transform-origin: 0 0;
  -o-transform: scale(.315, .315);
  -o-transform-origin: 0 0;
}

/* Presenter Mode */

body.presenter_view div.slide {
  display: inline;
  position: absolute;
  overflow: hidden;
  -moz-transform: scale(.5, .5);
  -moz-transform-origin: 0 0;
  -webkit-transform: scale(.5, .5);
  -webkit-transform-origin: 0 0;
  -o-transform: scale(.5, .5);
  -o-transform-origin: 0 0;
    margin-top: -300px;
}

body.presenter_view .slide.far-past {
  display: block;
  margin-left: -1500px;
}

body.presenter_view .slide.past {
  display: block;
  margin-left: -975px;
}

body.presenter_view .slide.current {
  display: block;
  margin-left: -475px;
  border: 8px solid maroon;
  z-index: 2;
}

body.presenter_view .slide.future {
  display: block;
  margin-left: 25px;
  z-index: 1;
}

body.presenter_view .slide.far-future {
  display: block;
  margin-left: 525px;
}

body.presenter_view div#current_presenter_notes {
    visibility: visible;
    display: block;
    position: absolute;
    overflow: auto;
    vertical-align: middle;
    left: 50%;
    top: 50%;
    margin-left: -475px;
    margin-top: 100px;
    z-index: 2;
    width: 950px;
    border-style: solid;
    height: 30%;
    background-color: silver;
}

body.presenter_view div#current_presenter_notes section {
  font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
  color: black;
  text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
  display: block;
  overflow: visible;
    position: relative;
    background-color: #fffeff;
    height: 120px;
    margin-right: 30px;
    margin-top: 60px;
    margin-left: 30px;
    padding-right: 10px;
    padding-left: 10px;
    padding-top: 10px;
}

body.presenter_view div#current_presenter_notes section p {
    margin: 0;
}

body.presenter_view div#current_presenter_notes h1 {
    font-size: 50%;
    display: block;
}

div#current_presenter_notes {
  display: none;
}

div.slide div.presenter_notes, div.slides div.presenter_notes {
  display: none;
}

/* Slide styles */

div.slide p {
  font-size: 20px;
}

.slide.far-past {
  display: block;
  margin-left: -2400px;
}

.slide.past {
  display: block;
  margin-left: -1400px;
}

.slide.current {
  display: block;
  margin-left: -450px;
}

.slide.future {
  display: block;
  margin-left: 500px;
}

.slide.far-future {
  display: block;
  margin-left: 1500px;
}

body.three-d div.slides {
  -webkit-transform: translateX(50px) scale(0.8) rotateY(10deg);
  -moz-transform: translateX(50px) scale(0.8) rotateY(10deg);
  -o-transform: translateX(50px) scale(0.8) rotateY(10deg);
}


/* Content */

header:not(:only-child) {
  font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
  font-weight: normal;
  font-size: 50px;
  letter-spacing: -.05em;
  color: black;
  text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
  position: absolute;
  left: 30px;
  top: 25px;
  margin: 0;
  padding: 0;
}

header h1, header h2, header h3, header h4, header h5, header h6 {
  display: inline;
  font-size: 100%;
  font-weight: normal;
  padding: 0;
  margin: 0;
}

header h2:first-child {
  margin-top: 0;
}

section, .slide header:only-child h1 {
  font-family: "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
  color: #3f3f3f;
  text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
  margin-left: 30px;
  margin-right: 30px;
  margin-top: 100px;
  display: block;
  overflow: hidden;
}

img { display: block; margin: auto; }

section img.align-center {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

section img.align-right {
  display: block;
  margin-left: auto;
  margin-right: 0;
}

section img.align-left {
  display: block;
  margin-right: auto;
  margin-left: 0;
}

a {
  color: inherit;
  display: inline-block;
  text-decoration: none;
  line-height: 110%;
  border-bottom: 2px solid #3f3f3f;
}

pre, code, tt {
  font-family: Monaco, Consolas, 'Bitstream Vera Sans Mono', 'Lucida Console', FreeMono, Courier, monospace;
}

pre, .gist .gist-file .gist-data {
  font-size: 18px;
  max-height: 485px;
  padding-top: 0.25em !important;
  padding-right: 0.5em !important;
  padding-left: 0.5em !important;
  overflow: auto;
}

/* render a nice scrollbar in overflowed pre area's */
::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: -webkit-gradient(linear, left bottom, left top, from(#777), to(#bbd));
  -webkit-border-radius: 1ex;
}
::-webkit-scrollbar-corner {
  background: #dedede;
}

blockquote {
  border-left: solid 8px #778;
  padding: .1ex 1ex;
  font-style: italic;
  font-size: 20px;
}

li {
  padding: 10px 0;
  font-size: 20px;
}

li pre { margin-left: 0em; }

.slide header:only-child h1 {
  line-height: 180%;
  text-align: center;
  display: table-cell;
  vertical-align: middle;
  height: 700px;
  width: 900px;
  font-size: 50px;
  margin-top:100px;
  margin-bottom:100px;
}

.sidebar {
  clear: both;
  background: -webkit-gradient(linear, top right, bottom right, from(#dde), to(#fff));
  -webkit-transition: margin 0.25s ease-in-out;
  background-color: #eee;
  background: -moz-linear-gradient(right, #dde, #fff);
  border-right: 5px solid #ccd;
  z-index: 9999999;
  height: 100%;
  overflow: hidden;
  top: 0;
  position: absolute;
  display: block;
  margin: 0;
  margin-left: -400px;
  padding: 10px 16px;
  overflow: auto;
  -webkit-transition: margin 0.2s ease-in-out;
  -moz-transition: margin 0.2s ease-in-out;
  -o-transition: margin 0.2s ease-in-out;
}

.sidebar h2 {
  text-shadow: rgba(0, 0, 0, 0.2) 0 2px 5px;
  margin: 0 0 16px;
  padding: 0;
}

.sidebar table {
  width: 100%;
  margin: 0;
  padding: 0;
  border-collapse: collapse;
}

.sidebar table caption {
  display: none;
}

.sidebar tr {
  margin: 2px 0;
  border-bottom: 1px solid #ccc;
}

.sidebar th {
  text-align: left;
  font-weight: normal;
  max-width: 300px;
  overflow: hidden;
}

.sidebar tr.sub th {
  text-indent: 20px;
}

.sidebar td {
  text-align: right;
  min-width: 20px;
}

.sidebar a {
  display: block;
  text-decoration: none;
  border-bottom: none;
  padding: 4px 0;
}

.sidebar tr.active {
  background: #ff0;
}

aside {
  display: none;
}
  aside.source {
    position: absolute;
    bottom: 6px;
    left: 10px;
    text-indent: 10px;
  }
  aside.page_number {
    position: absolute;
    bottom: 6px;
    right: 10px;
    text-indent: 10px;
  }

.notes {
  display: none;
  padding: 10px;
  background: #ccc;
  border-radius: 10px;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
}
  div.slide p.notes {
    font-size: 90%;
}

/* Pygments default theme */
.hll { background-color: #ffffcc }
.c { color: #408080; font-style: italic } /* Comment */
.err { border: 1px solid #FF0000 } /* Error */
.k { color: #008000; font-weight: bold } /* Keyword */
.o { color: #666666 } /* Operator */
.cm { color: #408080; font-style: italic } /* Comment.Multiline */
.cp { color: #BC7A00 } /* Comment.Preproc */
.c1 { color: #408080; font-style: italic } /* Comment.Single */
.cs { color: #408080; font-style: italic } /* Comment.Special */
.gd { color: #A00000 } /* Generic.Deleted */
.ge { font-style: italic } /* Generic.Emph */
.gr { color: #FF0000 } /* Generic.Error */
.gh { color: #000080; font-weight: bold } /* Generic.Heading */
.gi { color: #00A000 } /* Generic.Inserted */
.go { color: #808080 } /* Generic.Output */
.gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.gt { color: #0040D0 } /* Generic.Traceback */
.kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.kp { color: #008000 } /* Keyword.Pseudo */
.kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.kt { color: #B00040 } /* Keyword.Type */
.m { color: #666666 } /* Literal.Number */
.s { color: #BA2121 } /* Literal.String */
.na { color: #7D9029 } /* Name.Attribute */
.nb { color: #008000 } /* Name.Builtin */
.nc { color: #0000FF; font-weight: bold } /* Name.Class */
.no { color: #880000 } /* Name.Constant */
.nd { color: #AA22FF } /* Name.Decorator */
.ni { color: #999999; font-weight: bold } /* Name.Entity */
.ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.nf { color: #0000FF } /* Name.Function */
.nl { color: #A0A000 } /* Name.Label */
.nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.nt { color: #008000; font-weight: bold } /* Name.Tag */
.nv { color: #19177C } /* Name.Variable */
.ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.w { color: #bbbbbb } /* Text.Whitespace */
.mf { color: #666666 } /* Literal.Number.Float */
.mh { color: #666666 } /* Literal.Number.Hex */
.mi { color: #666666 } /* Literal.Number.Integer */
.mo { color: #666666 } /* Literal.Number.Oct */
.sb { color: #BA2121 } /* Literal.String.Backtick */
.sc { color: #BA2121 } /* Literal.String.Char */
.sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.s2 { color: #BA2121 } /* Literal.String.Double */
.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.sh { color: #BA2121 } /* Literal.String.Heredoc */
.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.sx { color: #008000 } /* Literal.String.Other */
.sr { color: #BB6688 } /* Literal.String.Regex */
.s1 { color: #BA2121 } /* Literal.String.Single */
.ss { color: #19177C } /* Literal.String.Symbol */
.bp { color: #008000 } /* Name.Builtin.Pseudo */
.vc { color: #19177C } /* Name.Variable.Class */
.vg { color: #19177C } /* Name.Variable.Global */
.vi { color: #19177C } /* Name.Variable.Instance */
.il { color: #666666 } /* Literal.Number.Integer.Long */
.lineno { padding-right: 10px } /* A few space after linenos */

#blank {
  position: absolute;
  top: 0;
  left: 0;
  background-color: black;
  width: 100%;
  height: 100%;
  z-index: 64;
  display: none;
}

.image-reference {
  display: inline;
}

    </style>
    
    
    <!-- /Styles -->
    <!-- Javascripts -->
    
    <script>
      function main() {
    // Since we don't have the fallback of attachEvent and
    // other IE only stuff we won't try to run JS for IE.
    // It will run though when using Google Chrome Frame
    if (document.all) { return; }

    var currentSlideNo;
    var notesOn = false;
    var expanded = false;
    var hiddenContext = false;
    var blanked = false;
    var slides = document.getElementsByClassName('slide');
    var touchStartX = 0;
    var spaces = /\s+/, a1 = [''];
    var tocOpened = false;
    var helpOpened = false;
    var overviewActive = false;
    var modifierKeyDown = false;
    var scale = 1;
    var showingPresenterView = false;
    var presenterViewWin = null;
    var isPresenterView = false;

    var str2array = function(s) {
        if (typeof s == 'string' || s instanceof String) {
            if (s.indexOf(' ') < 0) {
                a1[0] = s;
                return a1;
            } else {
                return s.split(spaces);
            }
        }
        return s;
    };

    var trim = function(str) {
        return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
    };

    var addClass = function(node, classStr) {
        classStr = str2array(classStr);
        var cls = ' ' + node.className + ' ';
        for (var i = 0, len = classStr.length, c; i < len; ++i) {
            c = classStr[i];
            if (c && cls.indexOf(' ' + c + ' ') < 0) {
                cls += c + ' ';
            }
        }
        node.className = trim(cls);
    };

    var removeClass = function(node, classStr) {
        var cls;
        if (!node) {
            throw 'no node provided';
        }
        if (classStr !== undefined) {
            classStr = str2array(classStr);
            cls = ' ' + node.className + ' ';
            for (var i = 0, len = classStr.length; i < len; ++i) {
                cls = cls.replace(' ' + classStr[i] + ' ', ' ');
            }
            cls = trim(cls);
        } else {
            cls = '';
        }
        if (node.className != cls) {
            node.className = cls;
        }
    };

    var getSlideEl = function(slideNo) {
        if (slideNo > 0) {
            return slides[slideNo - 1];
        } else {
            return null;
        }
    };

    var getSlideTitle = function(slideNo) {
        var el = getSlideEl(slideNo);
        if (el) {
            var headers = el.getElementsByTagName('header');
            if (headers.length > 0) {
                return el.getElementsByTagName('header')[0].innerText;
            }
        }
        return null;
    };

    var getSlidePresenterNote = function(slideNo) {
        var el = getSlideEl(slideNo);
        if (el) {
            var n = el.getElementsByClassName('presenter_notes');
            if (n.length > 0) {
                return n[0];
            }
        }
        return null;
    };

    var changeSlideElClass = function(slideNo, className) {
        var el = getSlideEl(slideNo);
        if (el) {
            removeClass(el, 'far-past past current future far-future');
            addClass(el, className);
        }
    };

    var updateSlideClasses = function(updateOther) {
        window.location.hash = (isPresenterView ? "presenter" : "slide") + currentSlideNo;

        for (var i=1; i<currentSlideNo-1; i++) {
            changeSlideElClass(i, 'far-past');
        }

        changeSlideElClass(currentSlideNo - 1, 'past');
        changeSlideElClass(currentSlideNo, 'current');
        changeSlideElClass(currentSlideNo + 1, 'future');

        for (i=currentSlideNo+2; i<slides.length+1; i++) {
            changeSlideElClass(i, 'far-future');
        }

        highlightCurrentTocLink();

        processContext();

        document.getElementsByTagName('title')[0].innerText = getSlideTitle(currentSlideNo);

        updatePresenterNotes();

        if (updateOther) { updateOtherPage(); }
    };

    var updatePresenterNotes = function() {
        if (!isPresenterView) { return; }

        var existingNote = document.getElementById('current_presenter_notes');
        var currentNote = getSlidePresenterNote(currentSlideNo).cloneNode(true);
        currentNote.setAttribute('id', 'presenter_note');

        existingNote.replaceChild(currentNote, document.getElementById('presenter_note'));
    };

    var highlightCurrentTocLink = function() {
        var toc = document.getElementById('toc');

        if (toc) {
            var tocRows = toc.getElementsByTagName('tr');
            for (var i=0; i<tocRows.length; i++) {
                removeClass(tocRows.item(i), 'active');
            }

            var currentTocRow = document.getElementById('toc-row-' + currentSlideNo);
            if (currentTocRow) {
                addClass(currentTocRow, 'active');
            }
        }
    };

    var updateOtherPage = function() {
        if (!showingPresenterView) { return; }

        var w = isPresenterView ? window.opener : presenterViewWin;
        w.postMessage('slide#' + currentSlideNo, '*');
    };

    var nextSlide = function() {
        if (currentSlideNo < slides.length) {
            currentSlideNo++;
        }
        updateSlideClasses(true);
    };

    var prevSlide = function() {
        if (currentSlideNo > 1) {
            currentSlideNo--;
        }
        updateSlideClasses(true);
    };

    var showNotes = function() {
        var notes = getSlideEl(currentSlideNo).getElementsByClassName('notes');
        for (var i = 0, len = notes.length; i < len; i++) {
            notes.item(i).style.display = (notesOn) ? 'none':'block';
        }
        notesOn = !notesOn;
    };

    var showSlideNumbers = function() {
        var asides = document.getElementsByClassName('page_number');
        var hidden = asides[0].style.display != 'block';
        for (var i = 0; i < asides.length; i++) {
            asides.item(i).style.display = hidden ? 'block' : 'none';
        }
    };

    var showSlideSources = function() {
        var asides = document.getElementsByClassName('source');
        var hidden = asides[0].style.display != 'block';
        for (var i = 0; i < asides.length; i++) {
            asides.item(i).style.display = hidden ? 'block' : 'none';
        }
    };

    var showToc = function() {
        if (helpOpened) {
                showHelp();
        }
        var toc = document.getElementById('toc');
        if (toc) {
            toc.style.marginLeft = tocOpened ? '-' + (toc.clientWidth + 20) + 'px' : '0px';
            tocOpened = !tocOpened;
        }
        updateOverview();
    };

    var showHelp = function() {
        if (tocOpened) {
                showToc();
        }

        var help = document.getElementById('help');

        if (help) {
            help.style.marginLeft = helpOpened ? '-' + (help.clientWidth + 20) + 'px' : '0px';
            helpOpened = !helpOpened;
        }
    };

    var showPresenterView = function() {
        if (isPresenterView) { return; }

        if (showingPresenterView) {
            presenterViewWin.close();
            presenterViewWin = null;
            showingPresenterView = false;
        } else {
            presenterViewWin = open(window.location.pathname + "#presenter" + currentSlideNo, 'presenter_notes',
                                                                    'directories=no,location=no,toolbar=no,menubar=no,copyhistory=no');
            showingPresenterView = true;
        }
    };

    var switch3D = function() {
        if (document.body.className.indexOf('three-d') == -1) {
            document.getElementsByClassName('presentation')[0].style.webkitPerspective = '1000px';
            document.body.className += ' three-d';
        } else {
            window.setTimeout('document.getElementsByClassName(\'presentation\')[0].style.webkitPerspective = \'0\';', 2000);
            document.body.className = document.body.className.replace(/three-d/, '');
        }
    };

    var toggleOverview = function() {
        if (!overviewActive) {
            addClass(document.body, 'expose');
            overviewActive = true;
            setScale(1);
        } else {
            removeClass(document.body, 'expose');
            overviewActive = false;
            if (expanded) {
                setScale(scale);    // restore scale
            }
        }
        processContext();
        updateOverview();
    };

    var updateOverview = function() {
        try {
            var presentation = document.getElementsByClassName('presentation')[0];
        } catch (e) {
            return;
        }

        if (isPresenterView) {
            var action = overviewActive ? removeClass : addClass;
            action(document.body, 'presenter_view');
        }

        var toc = document.getElementById('toc');

        if (!toc) {
            return;
        }

        if (!tocOpened || !overviewActive) {
            presentation.style.marginLeft = '0px';
            presentation.style.width = '100%';
        } else {
            presentation.style.marginLeft = toc.clientWidth + 'px';
            presentation.style.width = (presentation.clientWidth - toc.clientWidth) + 'px';
        }
    };

    var computeScale = function() {
        var cSlide = document.getElementsByClassName('current')[0];
        var sx = cSlide.clientWidth / window.innerWidth;
        var sy = cSlide.clientHeight / window.innerHeight;
        return 1 / Math.max(sx, sy);
    };

    var setScale = function(scale) {
        var presentation = document.getElementsByClassName('slides')[0];
        var transform = 'scale(' + scale + ')';
        presentation.style.MozTransform = transform;
        presentation.style.WebkitTransform = transform;
        presentation.style.OTransform = transform;
        presentation.style.msTransform = transform;
        presentation.style.transform = transform;
    };

    var expandSlides = function() {
        if (overviewActive) {
            return;
        }
        if (expanded) {
            setScale(1);
            expanded = false;
        } else {
            scale = computeScale();
            setScale(scale);
            expanded = true;
        }
    };

    var showContext = function() {
        try {
            var presentation = document.getElementsByClassName('slides')[0];
            removeClass(presentation, 'nocontext');
        } catch (e) {}
    };

    var hideContext = function() {
        try {
            var presentation = document.getElementsByClassName('slides')[0];
            addClass(presentation, 'nocontext');
        } catch (e) {}
    };

    var processContext = function() {
        if (hiddenContext) {
            hideContext();
        } else {
            showContext();
        }
    };

    var toggleContext = function() {
        hiddenContext = !hiddenContext;
        processContext();
    };

    var toggleBlank = function() {
        blank_elem = document.getElementById('blank');

        blank_elem.style.display = blanked ? 'none' : 'block';

        blanked = !blanked;
    };

    var isModifierKey = function(keyCode) {
        switch (keyCode) {
            case 16: // shift
            case 17: // ctrl
            case 18: // alt
            case 91: // command
                return true;
                break;
            default:
                return false;
                break;
        }
    };

    var checkModifierKeyUp = function(event) {
        if (isModifierKey(event.keyCode)) {
            modifierKeyDown = false;
        }
    };

    var checkModifierKeyDown = function(event) {
        if (isModifierKey(event.keyCode)) {
            modifierKeyDown = true;
        }
    };

    var handleBodyKeyDown = function(event) {
        switch (event.keyCode) {
            case 13: // Enter
                if (overviewActive) {
                    toggleOverview();
                }
                break;
            case 27: // ESC
                toggleOverview();
                break;
            case 37: // left arrow
            case 33: // page up
                event.preventDefault();
                prevSlide();
                break;
            case 39: // right arrow
            case 32: // space
            case 34: // page down
                event.preventDefault();
                nextSlide();
                break;
            case 50: // 2
                if (!modifierKeyDown) {
                        showNotes();
                }
                break;
            case 51: // 3
                if (!modifierKeyDown && !overviewActive) {
                    switch3D();
                }
                break;
            case 190: // .
            case 48: // 0
            case 66: // b
                if (!modifierKeyDown && !overviewActive) {
                    toggleBlank();
                }
                break;
            case 67: // c
                if (!modifierKeyDown && !overviewActive) {
                    toggleContext();
                }
                break;
            case 69: // e
                if (!modifierKeyDown && !overviewActive) {
                    expandSlides();
                }
                break;
            case 72: // h
                showHelp();
                break;
            case 78: // n
                if (!modifierKeyDown && !overviewActive) {
                    showSlideNumbers();
                }
                break;
            case 80: // p
                if (!modifierKeyDown && !overviewActive) {
                    showPresenterView();
                }
                break;
            case 83: // s
                if (!modifierKeyDown && !overviewActive) {
                    showSlideSources();
                }
                break;
            case 84: // t
                showToc();
                break;
        }
    };

    var handleWheel = function(event) {
        if (tocOpened || helpOpened || overviewActive) {
            return;
        }

        var delta = 0;

        if (!event) {
            event = window.event;
        }

        if (event.wheelDelta) {
            delta = event.wheelDelta/120;
            if (window.opera) delta = -delta;
        } else if (event.detail) {
            delta = -event.detail/3;
        }

        if (delta && delta <0) {
            nextSlide();
        } else if (delta) {
            prevSlide();
        }
    };

    var addSlideClickListeners = function() {
        for (var i=0; i < slides.length; i++) {
            var slide = slides.item(i);
            slide.num = i + 1;
            slide.addEventListener('click', function(e) {
                if (overviewActive) {
                    currentSlideNo = this.num;
                    toggleOverview();
                    updateSlideClasses(true);
                    e.preventDefault();
                }
                return false;
            }, true);
        }
    };

    var addRemoteWindowControls = function() {
        window.addEventListener("message", function(e) {
            if (e.data.indexOf("slide#") != -1) {
                    currentSlideNo = Number(e.data.replace('slide#', ''));
                    updateSlideClasses(false);
            }
        }, false);
    };

    var addTouchListeners = function() {
        document.addEventListener('touchstart', function(e) {
            touchStartX = e.touches[0].pageX;
        }, false);
        document.addEventListener('touchend', function(e) {
            var pixelsMoved = touchStartX - e.changedTouches[0].pageX;
            var SWIPE_SIZE = 150;
            if (pixelsMoved > SWIPE_SIZE) {
                nextSlide();
            }
            else if (pixelsMoved < -SWIPE_SIZE) {
             prevSlide();
            }
        }, false);
    };

    var addTocLinksListeners = function() {
        var toc = document.getElementById('toc');
        if (toc) {
            var tocLinks = toc.getElementsByTagName('a');
            for (var i=0; i < tocLinks.length; i++) {
                tocLinks.item(i).addEventListener('click', function(e) {
                    currentSlideNo = Number(this.attributes['href'].value.replace('#slide', ''));
                    updateSlideClasses(true);
                    e.preventDefault();
                }, true);
            }
        }
    };

    // initialize

    (function() {
        if (window.location.hash == "") {
            currentSlideNo = 1;
        } else if (window.location.hash.indexOf("#presenter") != -1) {
            currentSlideNo = Number(window.location.hash.replace('#presenter', ''));
            isPresenterView = true;
            showingPresenterView = true;
            presenterViewWin = window;
            addClass(document.body, 'presenter_view');
        } else {
            currentSlideNo = Number(window.location.hash.replace('#slide', ''));
        }

        document.addEventListener('keyup', checkModifierKeyUp, false);
        document.addEventListener('keydown', handleBodyKeyDown, false);
        document.addEventListener('keydown', checkModifierKeyDown, false);
        document.addEventListener('DOMMouseScroll', handleWheel, false);

        window.onmousewheel = document.onmousewheel = handleWheel;
        window.onresize = expandSlides;

        for (var i = 0, el; el = slides[i]; i++) {
            addClass(el, 'slide far-future');
        }
        updateSlideClasses(false);

        // add support for finger events (filter it by property detection?)
        addTouchListeners();

        addTocLinksListeners();

        addSlideClickListeners();

        addRemoteWindowControls();
    })();
}

    </script>
    
    
    
    <!-- /Javascripts -->
</head>
<body>
  <div id="blank"></div>
  <div class="presentation">
    <div id="current_presenter_notes">
      <div id="presenter_note"></div>
    </div>
    <div class="slides">
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-1">
          <div class="inner">
            
            <header><h1>Project2 股票舆情分析</h1></header>
            
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              1/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-2">
          <div class="inner">
            
            <header><h2>数据集说明</h2></header>
            
            
            <section><ul>
<li>样本集：指标有negative、 neutral、positive词性的数据集  </li>
<li>数据集：指待分类股票标题数据集</li>
</ul></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              2/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-3">
          <div class="inner">
            
            <header><h2>主要设计思路</h2></header>
            
            
            <section><ol>
<li>数据预处理<ul>
<li>从原始数据集中提取新闻标题并分词</li>
<li>数据清洗（清洗分词后仍出现的非中文字符）</li>
<li>对样本集三个情感标签下的词组分别进行词频统计</li>
</ul>
</li>
<li>文本向量化<ul>
<li>分别对样本集和数据集中的词组计算tf-idf值</li>
<li>为了方便后续处理，将tf-idf值*10000进行扩大</li>
<li>根据一个词和对应的tf-idf值将文本转化成向量数组</li>
</ul>
</li>
<li>特征选择</li>
<li>模型训练&amp;分类</li>
</ol></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              3/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-4">
          <div class="inner">
            
            <header><h1>数据预处理</h1></header>
            
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              4/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide has_code slide-5">
          <div class="inner">
            
            <header><h2>segment.java</h2></header>
            
            
            <section><ul>
<li>对新闻标题和样本集的内容进行分词</li>
<li>数据清洗：用正则表达式除去非中文字符<div class="highlight"><pre><span></span><span class="lineno">1 </span><span class="n">String</span> <span class="n">titles</span> <span class="o">=</span> <span class="n">StringUtils</span><span class="o">.</span><span class="na">strip</span><span class="o">(</span><span class="n">tempseg</span><span class="o">.</span><span class="na">toString</span><span class="o">().</span><span class="na">replaceAll</span><span class="o">(</span><span class="s">&quot;[,.%/(A-Za-z0-9)]&quot;</span><span class="o">,</span><span class="s">&quot;&quot;</span><span class="o">),</span><span class="s">&quot;[]&quot;</span><span class="o">);</span>
<span class="lineno">2 </span><span class="n">titles</span> <span class="o">=</span> <span class="n">titles</span><span class="o">.</span><span class="na">replace</span><span class="o">(</span><span class="s">&quot;\\s+&quot;</span><span class="o">,</span><span class="s">&quot; &quot;</span><span class="o">);</span>
</pre></div>

</li>
</ul></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              5/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-6">
          <div class="inner">
            
            <header><h1>文本向量化</h1></header>
            
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              6/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-7">
          <div class="inner">
            
            <header><h2>Tfidf.java(1）</h2></header>
            
            
            <section><blockquote>
<p>TF-IDF是一种统计方法，用以评估一字词对于一个文件集或一个语料库中的其中一份文件的重要程度。字词的重要性随着它在文件中出现的次数成正比增加，但同时会随着它在语料库中出现的频率成反比下降。TF-IDF加权的各种形式常被搜索引擎应用，作为文件与用户查询之间相关程度的度量或评级。除了TF-IDF以外，因特网上的搜索引擎还会使用基于链接分析的评级方法，以确定文件在搜寻结果中出现的顺序。</p>
<p>来源：百度百科</p>
</blockquote></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              7/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-8">
          <div class="inner">
            
            <header><h2>Tf-idf.java(2)</h2></header>
            
            
            <section><ul>
<li>TF：一个词在该文本中的词频  </li>
<li>IDF：逆向文件频率  </li>
<li>一个词的Tf-Idf值标识着它对于该文本的重要性，即一个词在该文本中出现的次数越多，在整个语料库中出现的次数越少就越能说明这个词能在很大程度上代表这个文本  </li>
<li>Tf-Idf相对于单纯的词频统计来说能够使得在所有文本中都出现的词如“股票”“公司”“新闻”等的权重下降，从而突出能够代表文本的特征词  </li>
<li>可以用Tf-Idf值可以过滤常用词并保留重要词，总而可以进行特征选择</li>
<li>Tf-Idf的java实现为分别计算一个词的tf值和idf值，然后将两者相乘（并扩大10000倍）作为其Tf-Idf值，并和对应的词组映射在哈希表最后将结果按照tf-idf值降序输出</li>
</ul></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              8/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-9">
          <div class="inner">
            
            <header><h2>word2vec.java</h2></header>
            
            
            <section><p>文本向量化主要思路：</p>
<ol>
<li>准备特征词<code>features.txt</code>（包含1500个特征词）</li>
<li>对样本集/测试集中每个文本建立一个1500维的数组（分别对应1500个特征词），将文本中的词组和特征词进行比对，若样本集/测试集中出现了某个特征词则把该词的tf-idf值传给数组，若没有则为0</li>
<li>根据后序算法所需输入格式相应调整输出格式</li>
</ol></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              9/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-10">
          <div class="inner">
            
            <header><h2>KNN模型训练及分类(1）</h2></header>
            
            
            <section><p>KNN就是根据某种距离度量检测未知数据与已知数据的距离，统计其中距离最近的k个已知数据的类别，以多数投票的形式确定未知数据的类别。</p>
<p>源程序共定义了三个class文件，分别是：</p>
<ul>
<li>KNNNode：KNN结点类，用来存储最近邻的k个元组相关的信息</li>
<li>KNN：KNN算法主体类 </li>
<li>TestKNN：KNN算法测试类 </li>
</ul></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              10/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-11">
          <div class="inner">
            
            <header><h2>KNN模型训练及分类(2）</h2></header>
            
            
            <section><ul>
<li>
<p>TestKNN.java</p>
<ul>
<li>
<p><code>public void read（）</code> ：读取文件中的数据，存储为数组的形式（以嵌套链表的形式实现）</p>
</li>
<li>
<p><code>main</code> ：读入样本集和测试集的数据，然后输出测试集的分类</p>
</li>
</ul>
</li>
<li>
<p>KNN.java：此程序定义了一个大小为k的优先级队列来存储k个最近邻节点  </p>
<ul>
<li>优先级队列初始默认是距离越远越优先  </li>
<li>根据算法中的实现，将与测试集最近的k个节点保存下来</li>
</ul>
</li>
<li>KNNNode.java：用来存储最近邻的k个元组相关的信息</li>
</ul></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              11/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-12">
          <div class="inner">
            
            <header><h2>KNN输入文件</h2></header>
            
            
            <section><p>训练集：knntrain.txt
格式：【tfidf值1】【tfidf值2】···【tfidf值1500】【 分类标号】
示例：（以二维数据为例）</p>
<blockquote>
<p>0.1887    0.3276    -1<br />
0.8178      0.7703     1<br />
0.6761      0.4849    -1</p>
</blockquote>
<p>测试集：knndata.txt
格式：【tfidf值1】【tfidf值2】···【tfidf值1500】
示例：（以二维数据为例）</p>
<blockquote>
<p>0.9516    0.0326<br />
0.9203    0.5612<br />
0.0527    0.8819<br />
0.7379    0.6692</p>
</blockquote></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              12/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-13">
          <div class="inner">
            
            <header><h2>KNN分类结果</h2></header>
            
            
            <section><p>股票数据集KNN算法输出结果部分截图：</p>
<p><img alt="" src="" /></p></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              13/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-14">
          <div class="inner">
            
            <header><h1>NaiveBayes模型训练及分类</h1></header>
            
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              14/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-15">
          <div class="inner">
            
            <header><h2>代码结构</h2></header>
            
            
            <section><ul>
<li>NaiveBayesMain.java 主程序入口   </li>
<li>NaiveBayesConf.java 用于处理配置文件  </li>
<li>NaiveBayesTrain.java 用于训练过程的MapReduce 描述   </li>
<li>NaiveBayesTrainData.java 在测试过程之前，读取训练后数据   </li>
<li>NaiveBayesTest.java 用于测试（分类）过程的MapReduce 描述</li>
</ul></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              15/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-16">
          <div class="inner">
            
            <header><h2>算法设计</h2></header>
            
            
            <section><p>将文本向量化后的结果作为输入</p>
<ul>
<li>NaiveBayesTrain.java<ul>
<li>Mapper类：统计词出现的次数</li>
<li>Reducer类：计算每个类别里每个词出现的次数</li>
</ul>
</li>
<li>NaiveBayesTest.java<ul>
<li>Mapper类：概率计算 </li>
</ul>
</li>
</ul>
<p>分类结果：并不令人满意</p></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              16/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-17">
          <div class="inner">
            
            <header><h1>weka</h1></header>
            
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              17/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-18">
          <div class="inner">
            
            <header><h2>weka</h2></header>
            
            
            <section><blockquote>
<p>Weka是一款免费的，非商业化的，基于JAVA环境下开源的机器学习（machine learning）以及数据挖掘（data mining）软件。
来源：百度百科</p>
</blockquote>
<ul>
<li>GUI图形界面</li>
<li>java调用接口</li>
</ul></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              18/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-19">
          <div class="inner">
            
            <header><h2>arff.java</h2></header>
            
            
            <section><p>arff.java负责根据样本集和数据集来生成weka所需的输入文件格式为.arff格式</p>
<p>arff需要属性和分类，本程序把上一步生成的1000维tfidf数组作为1000个词组属性，把positive、neutral、negative作为分类。</p>
<p>训练集：1500实例，1001属性（1000维+1分类）
<img alt="" src="" /></p>
<blockquote>
<p>来源：weka GUI界面</p>
</blockquote>
<p>数据集：3267实例（3267个股票），1001属性
<img alt="" src="" /></p>
<blockquote>
<p>来源：weka GUI界面</p>
</blockquote></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              19/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide has_code slide-20">
          <div class="inner">
            
            <header><h2>weka.java</h2></header>
            
            
            <section><p>weka.java调用weka接口，实现了朴素贝叶斯、决策树、随机森林三个机器学习算法的数据挖掘</p>
<div class="highlight"><pre><span></span><span class="lineno"> 1 </span><span class="c1">//此方法负责把分类后生成的arff结果文件中的</span>
<span class="lineno"> 2 </span><span class="c1">//类标签提取出来并和股票新闻标题一并输出</span>
<span class="lineno"> 3 </span><span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">getWekaResult</span><span class="o">(</span><span class="n">String</span> <span class="n">arff</span><span class="o">,</span> <span class="n">String</span> <span class="n">out</span><span class="o">)</span> <span class="o">{</span>
<span class="lineno"> 4 </span>    <span class="err">……</span>
<span class="lineno"> 5 </span><span class="o">}</span>
<span class="lineno"> 6 </span>
<span class="lineno"> 7 </span><span class="o">!</span><span class="n">java</span>
<span class="lineno"> 8 </span><span class="c1">//此方法负责训练分类器并对数据集进行分类并进行交叉验证评估</span>
<span class="lineno"> 9 </span><span class="c1">//最后输出至.arff文件</span>
<span class="lineno">10 </span><span class="kd">public</span> <span class="kd">static</span> <span class="kt">void</span> <span class="nf">classify</span><span class="o">(</span><span class="n">String</span> <span class="n">classifyName</span><span class="o">,</span> <span class="n">Instances</span> <span class="n">train</span><span class="o">,</span> <span class="n">String</span> <span class="n">result</span><span class="o">)</span> <span class="kd">throws</span> <span class="n">Exception</span><span class="o">{</span>
<span class="lineno">11 </span>    <span class="err">……</span>
<span class="lineno">12 </span><span class="o">}</span>
</pre></div>
</section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              20/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-21">
          <div class="inner">
            
            <header><h2>分类结果</h2></header>
            
            
            <section><p>三种算法正确率评估截图（用样本集交叉验证评估）：</p>
<p><img alt="" src="" /></p></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              21/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-22">
          <div class="inner">
            
            <header><h1>三种算法分类结果对比</h1></header>
            
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              22/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-23">
          <div class="inner">
            
            <header><h2>朴素贝叶斯</h2></header>
            
            
            <section><p><img alt="" src="" /> </p></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              23/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-24">
          <div class="inner">
            
            <header><h2>决策树</h2></header>
            
            
            <section><p><img alt="" src="" /> </p></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              24/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-25">
          <div class="inner">
            
            <header><h2>随机森林</h2></header>
            
            
            <section><p><img alt="" src="" /> </p></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              25/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-26">
          <div class="inner">
            
            <header><h2>可能的改进之处</h2></header>
            
            
            <section><p>实现随机森林、决策树、SVM的MapReduce的实现<br />
特征选择可以考虑用信息增益、卡方检验等方法</p></section>
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              26/27
            </aside>
          </footer>
        </div>
      </div>
      
      <!-- slide source: pre.md -->
      <div class="slide-wrapper">
        <div class="slide slide-27">
          <div class="inner">
            
            <header><h1>谢谢大家！</h1></header>
            
            
          </div>
          <div class="presenter_notes">
            <header><h1>Presenter Notes</h1></header>
            <section>
            
            </section>
          </div>
          <footer>
            
            <aside class="source">
              Source: <a href="pre.md">pre.md</a>
            </aside>
            
            <aside class="page_number">
              27/27
            </aside>
          </footer>
        </div>
      </div>
      
    </div>
  </div>
  
  <div id="toc" class="sidebar hidden">
    <h2>Table of Contents</h2>
    <table>
      <caption>Table of Contents</caption>
      
      <tr id="toc-row-1">
        <th><a href="#slide1">Project2 股票舆情分析</a></th>
        <td><a href="#slide1">1</a></td>
      </tr>
      
        
        <tr id="toc-row-2" class="sub">
          <th><a href="#slide2">数据集说明</a></th>
          <td><a href="#slide2">2</a></td>
        </tr>
        
        <tr id="toc-row-3" class="sub">
          <th><a href="#slide3">主要设计思路</a></th>
          <td><a href="#slide3">3</a></td>
        </tr>
        
      
      
      <tr id="toc-row-4">
        <th><a href="#slide4">数据预处理</a></th>
        <td><a href="#slide4">4</a></td>
      </tr>
      
        
        <tr id="toc-row-5" class="sub">
          <th><a href="#slide5">segment.java</a></th>
          <td><a href="#slide5">5</a></td>
        </tr>
        
      
      
      <tr id="toc-row-6">
        <th><a href="#slide6">文本向量化</a></th>
        <td><a href="#slide6">6</a></td>
      </tr>
      
        
        <tr id="toc-row-7" class="sub">
          <th><a href="#slide7">Tfidf.java(1）</a></th>
          <td><a href="#slide7">7</a></td>
        </tr>
        
        <tr id="toc-row-8" class="sub">
          <th><a href="#slide8">Tf-idf.java(2)</a></th>
          <td><a href="#slide8">8</a></td>
        </tr>
        
        <tr id="toc-row-9" class="sub">
          <th><a href="#slide9">word2vec.java</a></th>
          <td><a href="#slide9">9</a></td>
        </tr>
        
        <tr id="toc-row-10" class="sub">
          <th><a href="#slide10">KNN模型训练及分类(1）</a></th>
          <td><a href="#slide10">10</a></td>
        </tr>
        
        <tr id="toc-row-11" class="sub">
          <th><a href="#slide11">KNN模型训练及分类(2）</a></th>
          <td><a href="#slide11">11</a></td>
        </tr>
        
        <tr id="toc-row-12" class="sub">
          <th><a href="#slide12">KNN输入文件</a></th>
          <td><a href="#slide12">12</a></td>
        </tr>
        
        <tr id="toc-row-13" class="sub">
          <th><a href="#slide13">KNN分类结果</a></th>
          <td><a href="#slide13">13</a></td>
        </tr>
        
      
      
      <tr id="toc-row-14">
        <th><a href="#slide14">NaiveBayes模型训练及分类</a></th>
        <td><a href="#slide14">14</a></td>
      </tr>
      
        
        <tr id="toc-row-15" class="sub">
          <th><a href="#slide15">代码结构</a></th>
          <td><a href="#slide15">15</a></td>
        </tr>
        
        <tr id="toc-row-16" class="sub">
          <th><a href="#slide16">算法设计</a></th>
          <td><a href="#slide16">16</a></td>
        </tr>
        
      
      
      <tr id="toc-row-17">
        <th><a href="#slide17">weka</a></th>
        <td><a href="#slide17">17</a></td>
      </tr>
      
        
        <tr id="toc-row-18" class="sub">
          <th><a href="#slide18">weka</a></th>
          <td><a href="#slide18">18</a></td>
        </tr>
        
        <tr id="toc-row-19" class="sub">
          <th><a href="#slide19">arff.java</a></th>
          <td><a href="#slide19">19</a></td>
        </tr>
        
        <tr id="toc-row-20" class="sub">
          <th><a href="#slide20">weka.java</a></th>
          <td><a href="#slide20">20</a></td>
        </tr>
        
        <tr id="toc-row-21" class="sub">
          <th><a href="#slide21">分类结果</a></th>
          <td><a href="#slide21">21</a></td>
        </tr>
        
      
      
      <tr id="toc-row-22">
        <th><a href="#slide22">三种算法分类结果对比</a></th>
        <td><a href="#slide22">22</a></td>
      </tr>
      
        
        <tr id="toc-row-23" class="sub">
          <th><a href="#slide23">朴素贝叶斯</a></th>
          <td><a href="#slide23">23</a></td>
        </tr>
        
        <tr id="toc-row-24" class="sub">
          <th><a href="#slide24">决策树</a></th>
          <td><a href="#slide24">24</a></td>
        </tr>
        
        <tr id="toc-row-25" class="sub">
          <th><a href="#slide25">随机森林</a></th>
          <td><a href="#slide25">25</a></td>
        </tr>
        
        <tr id="toc-row-26" class="sub">
          <th><a href="#slide26">可能的改进之处</a></th>
          <td><a href="#slide26">26</a></td>
        </tr>
        
      
      
      <tr id="toc-row-27">
        <th><a href="#slide27">谢谢大家！</a></th>
        <td><a href="#slide27">27</a></td>
      </tr>
      
      
    </table>
  </div>
  
  <div id="help" class="sidebar hidden">
    <h2>Help</h2>
    <table>
      <caption>Help</caption>
      <tr>
        <th>Table of Contents</th>
        <td>t</td>
      </tr>
      <tr>
        <th>Exposé</th>
        <td>ESC</td>
      </tr>
      <tr>
        <th>Full screen slides</th>
        <td>e</td>
      </tr>
      <tr>
        <th>Presenter View</th>
        <td>p</td>
      </tr>
      <tr>
        <th>Source Files</th>
        <td>s</td>
      </tr>
      <tr>
        <th>Slide Numbers</th>
        <td>n</td>
      </tr>
      <tr>
        <th>Toggle screen blanking</th>
        <td>b</td>
      </tr>
      <tr>
        <th>Show/hide slide context</th>
        <td>c</td>
      </tr>
      <tr>
        <th>Notes</th>
        <td>2</td>
      </tr>
      <tr>
        <th>Help</th>
        <td>h</td>
      </tr>
    </table>
  </div>
  <script>main()</script>
</body>
</html>
